package com.yydream.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public class BaseEntity implements Serializable,Cloneable{

    private static final long serialVersionUID = 1L;

    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT, update = "now()")
    private Date createdTime;

    /**
     * 更新时间
     */
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE, update = "now()")
    private Date updatedTime;

    /**
     * 创建人
     */
    @TableField(value = "created_id", fill = FieldFill.INSERT)
    private Long createdId;
    /**
     * 更新人
     */
    @TableField(value = "updated_id", fill = FieldFill.INSERT_UPDATE)
    private Long updatedId;
}
